<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
    <meta name="format-detection" content="telephone=no">
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <title>爱创客测试版</title>

    <style>
        body,
        div,
        p,
        h1,
        h2,
        h3,
        em,
        span,
        a,
        td,
        form,
        input,
        select,
        textarea {
            margin: 0;
            padding: 0;
            font-size: 14px;
            font-style: normal;
            font-weight: normal;
            font-family: \5FAE\8F6F\96C5\9ED1;
        }

        body {
            font-family: "Helvetica Neue", Helvetica, STHeiTi, sans-serif;
            color: #808080;
            height: 100%;
            background: #e8e8e8;
        }

        img {
            border: none;
        }

        a {
            text-decoration: none;
            color: #333;
        }

        div {
            height: auto;
        }

        .clear {
            clear: both;
        }

        .wrapper {
            height: 100%
        }

        .content {
            height: 90%;
            position: relative;
        }

        .content img {
            max-width: 100%;
        }

        .download {
            font-size: 24px;
            text-align: center;
            margin: 20px 0;
            line-height: 2em;
            font-weight: bold;
            color: #000000;
            opacity: 0.7
        }

        .two-code {
            text-align: center;
        }

        .two-code img {
            max-width: 50%
        }

        .footer {
            padding-top: 2em;
            margin: 0 auto;
            width: 99%;
            height: 10%;
        }

        .footer div {
            font-size: 12px;
            text-align: center;
        }


        a.android-down {
            background: #00bd3a;
        }

        a.iPhone-down {
            background: #4293ec;
        }

        a.android-down em {
            width: 32px;
            background-position: 0px 0;
        }

        a.iPhone-down em {
            width: 30px;
            font-size: 12px;
            background-position: 0 -42px;
        }

        a.down em {
            height: 37px;
            background-image: url(https://hsiapi.haier.net:442/appstore/img/down_icon.png);
            background-repeat: no-repeat;
            display: inline-block;
            vertical-align: -10px;
            margin-right: 10px;
        }

        a.down {
            width: 274px;
            height: 57px;
            display: block;
            margin: 25px auto;
            font-size: 20px;
            color: #fff;
            text-decoration: none;
            padding: 22px 0 0;
            text-align: center;
            border-radius: 5px;
        }

        .show-tips {
            width: 100%;
            background: #fff;
            padding: 20px 30px;
            display: none;
        }

        .show-tips p {
            font-size: 18px;
            font-family: \5FAE\8F6F\96C5\9ED1;
            color: #000;
            font-weight: bold;
            line-height: 30px;
        }

        .jiantou {
            position: absolute;
            right: 12px;
            top: 12px;
        }

        .directions p {
            line-height: 24px;
        }

        a.desktop-down {
            background: #ff5800;
        }

        a.desktop-down em {
            width: 32px;
            background-position: 0px -80px;
        }

        .head {
            line-height: 50px;
            text-align: center;
            font-size: 20px;
            font-weight: 500;
            color: #5d5d5d;
        }

        .input-block {
            margin-bottom: 18px;
            text-align: center;
        }

        .input {
            display: block;
            background-color: #ffffff;
            height: 44px;
            width: 90%;
            border-radius: 10px;
            margin: 0 auto;
            border: solid 2px #dde5ed;
            padding: 0px 12px;
            box-sizing: border-box;
        }

        .btn {
            width: 90%;
            height: 44px;
            margin: 0 auto;
            text-align: center;
            border: solid 2px #dde5ed;
            border-radius: 22px;
            line-height: 44px;
            background-color: #0075ce;
            color: #fff;
            cursor: pointer;
        }
    </style>

    <script>
        var _hmt = _hmt || [];
    </script>

</head>

<body>
    <input type="hidden" id="projectCode" value="iMaker" />
    <div class="wrapper">
        <div id="UserCheck" style="width: 96%;margin: 30px auto 50px;position: relative;max-width: 360px;">
            <div style="line-height: 32px;">
                <p class="head">iMaker账号验证</p>
            </div>
            <div class="input-block">
                <input id="userid" placeholder="请输入服务兵账号" class="input" style="text-align:center;" />
            </div>
            <div class="input-block">
                <div id="btnCheck" class="btn">验 证</div>
            </div>
        </div>
        <div id="DownContent" class="content" style="display:none;">
            <div class="show-tips" id="showTips">
                <p style="margin-bottom:20px;">链接跳转被限制了</p>
                <p>点击右上角</p>
                <p>选择在浏览器（或Safari）打开</p>
                <p>即可下载</p>
                <p class="jiantou"><img src="img/jiantou.png" /></p>
            </div>

            <div class="download clear">爱创客测试版</div>
            <div class="two-code clear"><img src="https://gitee.com/HCC-Mobile/apps/raw/master/qrcode.png"></div>
            <div class="download clear" style="font-weight:normal; font-size:16px; color:#ff0000">
                iOS9以上用户，安装iMaker后，请在“设置 – 通用 – 描述文件/设备管理 – 企业级应用"中信任iMaker</div>
            <div class="download clear" style="font-weight:normal; font-size:16px; color:#ff0000">
                为了更好的使用和体验，应用安装过程中请允许应用的相关权限</div>
            <div style="text-align: center;">
                <a id="iPhoneDowns" class="iPhone-down down"
                    href="itms-services://?action=download-manifest&amp;url=https://gitee.com/HCC-Mobile/apps/raw/master/manifest.plist"><em></em>iPhone版下载</a>
                <a id="AndroidDowns" class="android-down down"
                    href="https://hcc-app-download.oss-cn-qingdao.aliyuncs.com/app/test/android_iMaker_1.8.7.apk"><em></em>Android版下载</a>
            </div>
        </div>
    </div>
    <script src="https://cdn.bootcss.com/jquery/1.7/jquery.min.js"></script>
    <script>
        function is_weixin() {
            var ua = navigator.userAgent.toLowerCase();
            if (ua.match(/MicroMessenger/i) == "micromessenger" || (ua.match(/(iphone|ipod|ios|ipad)/i) && ua.indexOf('safari') < 0)) {
                return true;
            } else {
                return false;
            }
        }
        $(function () {
            $("a").click(function () {
                if (is_weixin()) {
                    return false;
                } else {
                    return true;
                }
            });
            $("#btnCheck").click(function () {
                var value = $("#userid").val();
                var checker=new RegExp("HR\\d{2}C\\d{6}");
                if (value.length != 11 || !checker.test(value)) {
                    alert("请输入正确的服务兵账号！");
                    return;
                }
                $("#DownContent").show();
                $("#UserCheck").hide();
            });
        });

        if (is_weixin()) {
            document.getElementById("showTips").style.display = "block";
        } else {
            /*
            $('#iPhoneDowns').bind('click',function(){
                $('#iPhoneDowns').html('<em></em>准备安装中……');
                setTimeout(function(){
                    $('#iPhoneDowns').css('font-size','16px').css('line-height','38px');
                    $('#iPhoneDowns').html('正在安装，请按Home键在桌面查看');
                },5000);
            });
            */
            $('#iPhoneDowns').bind('click', function () {
                if ((navigator.userAgent.match(/(iPhone|iPod|ios|iPad)/i))) {
                    return true;
                } else {
                    alert("请用苹果手机扫描二维码进行下载");
                    return false;
                }
            });
        }
//document.getElementById("useragent").innerHtml = navigator.userAgent;
    </script>
</body>

</html>